#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Action {
	Begin,
	Update,
	End,
	Back,
}
#[derive(Debug, Clone)]
pub struct Ime {
	pub action: Action,
	pub data: Option<String>,
}
impl Ime {
	pub fn new(action: Action, data: Option<String>) -> Self {
		Self { action, data }
	}
	pub fn begin() -> Self {
		Self::new(Action::Begin, None)
	}
	pub fn update(data: String) -> Self {
		Self::new(Action::Update, Some(data))
	}
	pub fn end(data: String) -> Self {
		Self::new(Action::End, Some(data))
	}
	pub fn back() -> Self {
		Self::new(Action::Back, None)
	}
}